﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GA.Shared.Interfaces;
using System.Windows;
using System.Collections.ObjectModel;
using System.Runtime.Serialization;
using System.Windows.Data;

namespace GA.Shared.Objects
{
    public class FacilityType : LinkedDependencyObject
    {
        /// <summary>
        /// Identifies the Id Property.
        /// </summary>
        public static readonly DependencyProperty IdProperty =
            RegisterProperty(
                "Id",
                typeof(int),
                typeof(FacilityType),
                new PropertyMetadata(-1));

        /// <summary>
        /// Identifies the Name Property.
        /// </summary>
        public static readonly DependencyProperty NameProperty =
            RegisterProperty(
                "Name",
                typeof(string),
                typeof(FacilityType),
                new PropertyMetadata(string.Empty));

        /// <summary>
        /// Identifies the ItemsRequired Property.
        /// </summary>
        public static readonly DependencyProperty ItemsRequiredProperty =
            RegisterProperty(
                "ItemsRequired",
                typeof(ObservableCollection<Item>),
                typeof(FacilityType),
                new PropertyMetadata(null));

        /// <summary>
        /// Gets or sets the Id.
        /// </summary>
        
        public int Id
        {
            get { return (int)SafeGetValue(IdProperty); }
            set { SafeSetValue(IdProperty, value); }
        }

        /// <summary>
        /// Gets or sets the Name.
        /// </summary>
        
        public string Name
        {
            get { return (string)SafeGetValue(NameProperty); }
            set { SafeSetValue(NameProperty, value); }
        }

        /// <summary>
        /// Gets or sets the ItemsRequired.
        /// </summary>
        
        public ObservableCollection<Item> ItemsRequired
        {
            get { return (ObservableCollection<Item>)SafeGetValue(ItemsRequiredProperty); }
            set { SafeSetValue(ItemsRequiredProperty, value); }
        }

        public FacilityType()
        {
        }

        public FacilityType(LinkedDependencyObject baseObject)
            : base(baseObject)
        {
        }

        public FacilityType(LinkedDependencyObject baseObject, BindingMode bindingMode)
            : base(baseObject, bindingMode)
        {
        }
    }
}
